# 对象基础

class Clock:
    id=None
    price:float

    def beep(self):
        import winsound
        winsound.Beep(2000,3000)

clock1=Clock()
clock1.id="002001"
clock1.price=19.99
print(f"闹钟id：{clock1.id}，价格为{clock1.price}")
clock1.beep()

clock2=Clock()
clock2.id="002002"
clock2.price=29.99
print(f"闹钟id：{clock2.id}，价格为{clock2.price}")
clock2.beep()
